package com.lailai.service.impl;

import com.lailai.metadata.BizObjectTable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Author lgr
 * @Date 2025/9/15
 * @Email 983105834@qq.com
 */
@Service
public class AppConfiguration {
    private final Logger logger = LoggerFactory.getLogger(AppConfiguration.class);
    // 模块编码
    private String modelCode;
    // 业务对象表
    private Map<String, BizObjectTable> bizObjectTableMap;


    public BizObjectTable getBizObjectTable(String tableCode) {
        BizObjectTable var3 = null;
        try {
            BizObjectTable bizObjectTable = (BizObjectTable) this.bizObjectTableMap.get(tableCode);
            if (bizObjectTable != null) {
                var3 = bizObjectTable;
                return var3;
            }

            this.logger.error("该表不存在,modelCode={},tableCode = {}", this.modelCode, tableCode);
            var3 = null;
        } catch (Exception e) {
            this.logger.error("【获取表失败】错误详情:", e);
        }

        return var3;
    }
}
